<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>炫酷注册界面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .background {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, #2a5298, #1e3c72);
            z-index: -1;
        }

        .animated-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
            z-index: -2;
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .stars {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: -1;
        }

        .star {
            position: absolute;
            background: white;
            border-radius: 50%;
            animation: twinkle 3s infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.2; }
            50% { opacity: 1; }
        }

        .register-container {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(15px);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            padding: 40px;
            width: 450px;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
            animation: slideInBounce 1s ease-out;
        }

        @keyframes slideInBounce {
            0% {
                transform: translateY(-100px) scale(0.8);
                opacity: 0;
            }
            50% {
                transform: translateY(20px) scale(1.05);
                opacity: 0.8;
            }
            100% {
                transform: translateY(0) scale(1);
                opacity: 1;
            }
        }

        .register-title {
            color: white;
            font-size: 2.8em;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
            animation: pulse 2s ease-in-out infinite;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .input-group {
            margin-bottom: 20px;
            position: relative;
        }

        .input-field {
            width: 100%;
            padding: 15px;
            border: none;
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 16px;
            outline: none;
            transition: all 0.4s ease;
            border: 2px solid transparent;
            position: relative;
        }

        .input-field::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .input-field:focus {
            background: rgba(255, 255, 255, 0.3);
            border-color: #ff6b6b;
            box-shadow: 0 0 25px rgba(255, 107, 107, 0.6);
            transform: scale(1.03);
        }

        .input-field:valid {
            border-color: #4ecdc4;
            box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
        }

        .password-strength {
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            margin-top: 5px;
            overflow: hidden;
        }

        .password-strength-bar {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #ff6b6b, #ffa500, #4ecdc4);
            transition: width 0.3s ease;
            border-radius: 2px;
        }

        .register-btn {
            width: 100%;
            padding: 18px;
            border: none;
            border-radius: 15px;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
            color: white;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
            margin-top: 20px;
            box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
        }

        .register-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.6s;
        }

        .register-btn:hover::before {
            left: 100%;
        }

        .register-btn:hover {
            background: linear-gradient(45deg, #4ecdc4, #ff6b6b);
            transform: translateY(-3px);
            box-shadow: 0 15px 40px rgba(78, 205, 196, 0.4);
        }

        .register-btn:active {
            transform: translateY(0);
        }

        .login-link {
            margin-top: 25px;
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: all 0.3s ease;
            display: block;
        }

        .login-link:hover {
            color: #4ecdc4;
            text-shadow: 0 0 15px #4ecdc4;
            transform: scale(1.05);
        }

        .social-register {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .social-btn {
            display: inline-block;
            margin: 0 8px;
            padding: 12px 24px;
            border: none;
            border-radius: 30px;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            font-size: 14px;
            position: relative;
            overflow: hidden;
        }

        .social-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.1);
            transform: scaleX(0);
            transition: transform 0.3s ease;
            transform-origin: left;
        }

        .social-btn:hover::before {
            transform: scaleX(1);
        }

        .social-btn.google {
            background: linear-gradient(45deg, #db4437, #ff6b6b);
        }

        .social-btn.facebook {
            background: linear-gradient(45deg, #3b5998, #4ecdc4);
        }

        .social-btn.twitter {
            background: linear-gradient(45deg, #1da1f2, #45b7d1);
        }

        .social-btn:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        }

        .particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: -1;
        }

        .particle {
            position: absolute;
            width: 6px;
            height: 6px;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 50%;
            animation: float 8s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            33% { transform: translateY(-30px) rotate(120deg); }
            66% { transform: translateY(-15px) rotate(240deg); }
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            margin: 20px 0;
            text-align: left;
        }

        .custom-checkbox {
            position: relative;
            display: inline-block;
            width: 20px;
            height: 20px;
            margin-right: 10px;
        }

        .custom-checkbox input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .checkmark {
            position: absolute;
            top: 0;
            left: 0;
            height: 20px;
            width: 20px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        .custom-checkbox:hover .checkmark {
            background: rgba(255, 255, 255, 0.3);
        }

        .custom-checkbox input:checked ~ .checkmark {
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        }

        .checkmark:after {
            content: "";
            position: absolute;
            display: none;
        }

        .custom-checkbox input:checked ~ .checkmark:after {
            display: block;
        }

        .custom-checkbox .checkmark:after {
            left: 7px;
            top: 3px;
            width: 5px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        .checkbox-label {
            color: rgba(255, 255, 255, 0.8);
            font-size: 14px;
            cursor: pointer;
        }

        .progress-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 4px;
            background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.3s ease;
        }

        .register-container:hover .progress-bar {
            transform: scaleX(1);
        }
    </style>
</head>
<body>
    <div class="animated-bg"></div>
    <div class="background"></div>
    <div class="stars"></div>
    <div class="particles"></div>
    
    <div class="register-container">
        <div class="progress-bar"></div>
        <h2 class="register-title">注册</h2>
        <form id="registerForm">
            <div class="input-group">
                <input type="text" class="input-field" placeholder="用户名" required minlength="3">
            </div>
            <div class="input-group">
                <input type="email" class="input-field" placeholder="邮箱地址" required>
            </div>
            <div class="input-group">
                <input type="password" class="input-field" id="password" placeholder="密码" required minlength="6">
                <div class="password-strength">
                    <div class="password-strength-bar" id="strengthBar"></div>
                </div>
            </div>
            <div class="input-group">
                <input type="password" class="input-field" id="confirmPassword" placeholder="确认密码" required>
            </div>
            <div class="input-group">
                <input type="tel" class="input-field" placeholder="手机号码" required>
            </div>
            
            <div class="checkbox-group">
                <label class="custom-checkbox">
                    <input type="checkbox" required>
                    <span class="checkmark"></span>
                </label>
                <span class="checkbox-label">我同意用户协议和隐私政策</span>
            </div>
            
            <button type="submit" class="register-btn">立即注册</button>
        </form>
        
        <a href="login.html" class="login-link">已有账号？立即登录</a>
        
        <div class="social-register">
            <p style="color: rgba(255, 255, 255, 0.8); margin-bottom: 15px;">或使用社交账号注册</p>
            <a href="#" class="social-btn google">Google</a>
            <a href="#" class="social-btn facebook">Facebook</a>
            <a href="#" class="social-btn twitter">Twitter</a>
        </div>
    </div>

    <script>
        // 创建星星效果
        function createStars() {
            const starsContainer = document.querySelector('.stars');
            for (let i = 0; i < 150; i++) {
                const star = document.createElement('div');
                star.className = 'star';
                star.style.left = Math.random() * 100 + '%';
                star.style.top = Math.random() * 100 + '%';
                star.style.width = Math.random() * 4 + 1 + 'px';
                star.style.height = star.style.width;
                star.style.animationDelay = Math.random() * 3 + 's';
                star.style.animationDuration = (Math.random() * 2 + 2) + 's';
                starsContainer.appendChild(star);
            }
        }

        // 创建粒子效果
        function createParticles() {
            const particlesContainer = document.querySelector('.particles');
            for (let i = 0; i < 60; i++) {
                const particle = document.createElement('div');
                particle.className = 'particle';
                particle.style.left = Math.random() * 100 + '%';
                particle.style.top = Math.random() * 100 + '%';
                particle.style.animationDelay = Math.random() * 8 + 's';
                particle.style.animationDuration = (Math.random() * 6 + 6) + 's';
                particlesContainer.appendChild(particle);
            }
        }

        // 密码强度检测
        function checkPasswordStrength(password) {
            const strengthBar = document.getElementById('strengthBar');
            let strength = 0;
            
            if (password.length >= 6) strength += 25;
            if (password.match(/[a-z]/)) strength += 25;
            if (password.match(/[A-Z]/)) strength += 25;
            if (password.match(/[0-9]/)) strength += 25;
            
            strengthBar.style.width = strength + '%';
            
            if (strength < 50) {
                strengthBar.style.background = '#ff6b6b';
            } else if (strength < 75) {
                strengthBar.style.background = '#ffa500';
            } else {
                strengthBar.style.background = '#4ecdc4';
            }
        }

        // 密码确认检查
        function checkPasswordMatch() {
            const password = document.getElementById('password').value;
            const confirmPassword = document.getElementById('confirmPassword').value;
            const confirmInput = document.getElementById('confirmPassword');
            
            if (confirmPassword === '') {
                confirmInput.style.borderColor = 'transparent';
                return;
            }
            
            if (password === confirmPassword) {
                confirmInput.style.borderColor = '#4ecdc4';
                confirmInput.style.boxShadow = '0 0 20px rgba(78, 205, 196, 0.4)';
            } else {
                confirmInput.style.borderColor = '#ff6b6b';
                confirmInput.style.boxShadow = '0 0 20px rgba(255, 107, 107, 0.4)';
            }
        }

        // 注册表单处理
        document.getElementById('registerForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            const password = document.getElementById('password').value;
            const confirmPassword = document.getElementById('confirmPassword').value;
            
            if (password !== confirmPassword) {
                alert('两次输入的密码不一致！');
                return;
            }
            
            const btn = document.querySelector('.register-btn');
            const originalText = btn.textContent;
            
            btn.textContent = '注册中...';
            btn.style.background = 'linear-gradient(45deg, #666, #999)';
            
            setTimeout(() => {
                btn.textContent = '注册成功！';
                btn.style.background = 'linear-gradient(45deg, #00ff00, #00cc00)';
                
                setTimeout(() => {
                    alert('注册成功！欢迎加入我们！');
                    btn.textContent = originalText;
                    btn.style.background = 'linear-gradient(45deg, #ff6b6b, #4ecdc4)';
                }, 1500);
            }, 2500);
        });

        // 监听密码输入
        document.getElementById('password').addEventListener('input', function() {
            checkPasswordStrength(this.value);
        });

        document.getElementById('confirmPassword').addEventListener('input', checkPasswordMatch);

        // 输入框聚焦效果
        document.querySelectorAll('.input-field').forEach(input => {
            input.addEventListener('focus', function() {
                this.parentElement.style.transform = 'scale(1.02)';
            });
            
            input.addEventListener('blur', function() {
                this.parentElement.style.transform = 'scale(1)';
            });
        });

        // 初始化效果
        createStars();
        createParticles();

        // 鼠标移动视差效果
        document.addEventListener('mousemove', function(e) {
            const registerContainer = document.querySelector('.register-container');
            const x = (e.clientX / window.innerWidth - 0.5) * 20;
            const y = (e.clientY / window.innerHeight - 0.5) * 20;
            
            registerContainer.style.transform = `translate(${x}px, ${y}px)`;
        });

        // 页面加载完成后的入场动画
        window.addEventListener('load', function() {
            document.querySelector('.register-container').style.animation = 'slideInBounce 1s ease-out';
        });
    </script>
</body>
</html>